/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.zx.course.answers.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 课程回复表Entity
 * @author zpp
 * @version 2020-02-16
 */
@Table(name="t_course_answers", alias="a", columns={
		@Column(name="id", attrName="id", label="主键", isPK=true),
		@Column(name="question_id", attrName="questionId", label="问题标识"),
		@Column(name="teacher_id", attrName="teacherId", label="回答的老师"),
		@Column(name="teacher_name", attrName="teacherName", label="老师名称", queryType=QueryType.LIKE),
		@Column(name="teacher_avatar_url", attrName="teacherAvatarUrl", label="老师的头像"),
		@Column(name="content", attrName="content", label="内容"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class TcourseAnswers extends DataEntity<TcourseAnswers> {
	
	private static final long serialVersionUID = 1L;
	private String questionId;		// 问题标识
	private String teacherId;		// 回答的老师
	private String teacherName;		// 老师名称
	private String teacherAvatarUrl;		// 老师的头像
	private String content;		// 内容
	
	public TcourseAnswers() {
		this(null);
	}

	public TcourseAnswers(String id){
		super(id);
	}
	
	@Length(min=0, max=50, message="问题标识长度不能超过 50 个字符")
	public String getQuestionId() {
		return questionId;
	}

	public void setQuestionId(String questionId) {
		this.questionId = questionId;
	}
	
	@Length(min=0, max=50, message="回答的老师长度不能超过 50 个字符")
	public String getTeacherId() {
		return teacherId;
	}

	public void setTeacherId(String teacherId) {
		this.teacherId = teacherId;
	}
	
	@Length(min=0, max=50, message="老师名称长度不能超过 50 个字符")
	public String getTeacherName() {
		return teacherName;
	}

	public void setTeacherName(String teacherName) {
		this.teacherName = teacherName;
	}
	
	@Length(min=0, max=255, message="老师的头像长度不能超过 255 个字符")
	public String getTeacherAvatarUrl() {
		return teacherAvatarUrl;
	}

	public void setTeacherAvatarUrl(String teacherAvatarUrl) {
		this.teacherAvatarUrl = teacherAvatarUrl;
	}
	
	@Length(min=0, max=255, message="内容长度不能超过 255 个字符")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
}